/**
 * @param {number} a
 * @param {number} b
 * @param {number} c
 * @param {number} d
 * @param {number} e
 * @param {number} f
 * @return {number}
 */
var minMovesToCaptureTheQueen = function(a, b, c, d, e, f) {
    if(a == e) {
        if(d > Math.max(b , f) || d < Math.min(b, f)) return 1
        else {
            if(Math.abs(d - f) % 2 == 0) return 2
            else return 3
        }
    }
    if(b == f) {
        if(c > Math.max(a , e) || d < Math.min(a, e)) return 1
        else {
            if(Math.abs( - f) % 2 == 0) return 2
            else return 3
        }
    }
};
console.log(minMovesToCaptureTheQueen(1, 1, 8, 8, 2, 3));
console.log(minMovesToCaptureTheQueen(5, 3, 3, 4, 5, 2));
console.log(minMovesToCaptureTheQueen(1, 1, 1, 4, 1, 8));